app.directive('mySwiper',function(){
	return {
		restrict:'ECMA',
		replace: true,
		template:`
			<div class="swiper-container">
			    <div class="swiper-wrapper">
			        <div class="swiper-slide" ng-repeat="url in imgs">
			        	<img ng-src="{{url}}">
			        </div>
			    </div>
			    <!-- 如果需要分页器 -->
			    <div class="swiper-pagination"></div>
			</div>
		`,
		controller: function($scope){
			$scope.imgs = ['common/imgs/swImg01.jpg', 'common/imgs/swImg02.jpg', 'common/imgs/swImg03.jpg'];
			var mySwiper = new Swiper('.swiper-container', {
				loop:true,
				autoplay:1000,
				observer:true,	//监听
				//如果需要分页器
				autoplayDisableOnInteraction:false,
				pagination:'.swiper-pagination'
			})
		}
	}
})